<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getRemoteAddr() + ":" + request.getServerPort()
			+ path + "/std/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/JavaScript">
    function downloadfile(name){  
       window.self.location="download?fileName="+encodeURIComponent(name);
    }  
</script>
<title>学生列表</title>
</head>
<body>
	<a href="deleteAll">清除数据</a>&nbsp;&nbsp;
	<a href="importxls">导入学生数据</a>&nbsp;&nbsp;
	<a href="uploadMaterial">上传本节课的任务书</a>&nbsp;&nbsp;
	<a href="exportxls">导出学生数据</a>&nbsp;&nbsp;
	<a href="downloadzip">导出学生作业</a>&nbsp;&nbsp;
	<a href="exportemp">导出模板</a>&nbsp;&nbsp;
	总人数：&nbsp;${total }&nbsp;人&nbsp;&nbsp;已到：&nbsp;${arrival }&nbsp;人
	<br />
      <h2><%=basePath%></h2>
	<h1>
		内容列表&nbsp;&nbsp;&nbsp;&nbsp;<a href="list">刷新</a>
	</h1>
	
	<table align="center" width="100%" border="1">
		<tr>
			<td>学号</td>
			<td>用户名</td>
			<td>考勤</td>
			<td>电脑名</td>
			<td>作业</td>
			<td>作业大小</td>
			<td>奖励</td>
			<td>操作</td>
		</tr>
		<c:forEach items="${students }" var="student">
			<tr>
				<td>${student.uid }</td>
				<td>${student.username }</td>
				<td>${student.stats}</td>
				<td>${student.computername }</td>
				<td><a href="#" onclick="javascript:downloadfile('${student.homework}')">${student.homework}</a></td>
				<td>${student.filesize}K</td>
				<td><a href="good?uid=${ student.uid}">good</a>&nbsp;<a
					href="bad?uid=${ student.uid}">bad</a>&nbsp;( ${student.good} )</td>
				<td><a href="delete?uid=${ student.uid}">清除</a>&nbsp;&nbsp;<a href="truant?uid=${ student.uid}">旷课</a>&nbsp;&nbsp;<a href="late?uid=${ student.uid}">迟到</a>&nbsp;&nbsp;<a href="sick?uid=${ student.uid}">病假</a>&nbsp;&nbsp;<a href="holiday?uid=${ student.uid}">事假</a></td>
			</tr>
		</c:forEach>
	</table>

</body>
</html>